package com.zjgsu.nftplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author ahy231
 * @date 2022/3/4 10:53
 * @description
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("交易")
public class Deal {
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty("主键")
    private Long id;
    @ApiModelProperty("买家id")
    private Long buyerId;
    @ApiModelProperty("卖家id")
    private Long sellerId;
    @ApiModelProperty("商品id")
    private Long wareId;
    @ApiModelProperty("交易开始时间（出价时间）")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date startTime;
    @ApiModelProperty("交易结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date endTime;
    @ApiModelProperty("微信订单id")
    private String orderId;
    @ApiModelProperty("交易状态（未支付/1 支付中/2 支付成功/3 支付失败/4）")
    private Integer status;
    @ApiModelProperty("交易价格")
    private BigDecimal price;
    @ApiModelProperty("交易hash")
    private String hash;
}
